package com.ikkong.api.intercept;

import com.jfinal.aop.Interceptor;
import com.jfinal.aop.Invocation;
import com.jfinal.core.Controller;

public class CommonInterceptor implements Interceptor {
	public void intercept(Invocation inv) {
        Controller controller = inv.getController();
        controller.getResponse().setHeader("Access-Control-Allow-Origin", "*"); 
       // controller.getRequest()
    	controller.getResponse().addHeader("Access-Control-Allow-Headers","Origin, X-Requested-With, Content-Type, Accept"); 
    	
        inv.invoke();
    }

}
